package com.atguigu.spzx.manager.service.Impl;

import com.atguigu.spzx.common.log.service.SysOperLogService;
import com.atguigu.spzx.manager.mapper.SysOperLogMapper;
import com.atguigu.spzx.model.entity.system.SysOperLog;
import jakarta.annotation.Resource;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName: SysOperLogServiceImpl
 * Package: com.atguigu.spzx.manager.service.Impl
 * Description:
 *
 * @Author 刘强
 * @Create 2024/7/8 15:01
 * @Version 1.0
 */
@Service
public class SysOperLogServiceImpl implements SysOperLogService {
    @Resource
    private SysOperLogMapper sysOperLogMapper;
    /**
     * 保存操作日志
     * @param sysOperLog
     */
    @Override
//    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Async
    public void saveOperLog(SysOperLog sysOperLog) {
        sysOperLogMapper.saveOperLog(sysOperLog);
    }
}
